/* Copyright (c) 2010-2020 Vadim Surov.
 */
package com.srv.client;

import com.sencha.gxt.widget.core.client.info.Info;
import com.srv.shared.Service;
import com.srv.shared.ServiceAsync;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Oneortwo implements EntryPoint {

	public static final String SERVICE = "service";
	public static final String EVENTBUS = "eventbus";

	final String sessionKey = Window.Location.getParameter("session");	    
	final String runKey = Window.Location.getParameter("run");	    

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {

		Info.display("", "Loading...");

		final ServiceAsync service = (ServiceAsync)GWT.create(Service.class);
		Registry.register(SERVICE, service);
		final HandlerManager eventBus = new HandlerManager(null);
		Registry.register(EVENTBUS, eventBus);
		AppController appViewer = new AppController();
		appViewer.go(RootPanel.get());

	}
}